#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:6031)
#include "Sort.h"



void InsertSort(int* a, int n)
{
	
	for (int i = 0; i < n - 1; i++)
	{
		int end = i;
		int tmp = a[end + 1];
		if (a[i] > tmp)
		{
			a[end + 1] = a[i];
		}
		else
		{
			break;
		}
		end--;
		a[end + 1] = tmp;
		
	}
}